Polymorphism, Subtyping, Whole Program Analysis and Accurate Data Types in Usage Analysis
نویسندگان
چکیده
There are a number of choices to be made in the design of a type based usage analysis. Some of these are: Should the analysis be monomorphic or have some degree of polymorphism? What about subtyping? How should the analysis deal with user defined algebraic data types? Should it be a whole program analysis? Several researchers have speculated that these features are important but there has been a lack of empirical evidence. In this paper we present a systematic evaluation of each of these features in the context of a full scale implementation of a usage analysis for Haskell. Our measurements show that all features increase the precision. It is, however, not necessary to have them all to obtain an acceptable precision.
منابع مشابه
A Usage Analysis with Bounded Usage Polymorphism and Subtyping
Previously proposed usage analyses have proved not to scale up well for large programs. In this paper we present a powerful and accurate type based analysis designed to scale up for large programs. The key features of the type system are usage subtyping and bounded usage polymorphism. Bounded polymorphism can lead to huge constraint sets and to express constraints compactly we introduce a new e...
متن کاملA syntactic approach to inferring the life-time of data-regions
Structured operational semantics is widely recognized as a conceptually simple and practically expressive framework to formally design type systems in programming languages. Being easy to reason with, the type-theoretical setting of operational semantics is used increasingly to formulate program analysis techniques, called effect systems. Effect systems distinguish between the specification of ...
متن کاملOptimal Representations of Polymorphic
Many type inference and program analysis systems include notions of subtyping and parametric polymorphism. When used together, these two features induce equivalences that allow types to be simpliied by eliminating quantiied variables. Eliminating variables both improves the readability of types and the performance of algorithms whose complexity depends on the number of type variables. We presen...
متن کاملPhantom Types and Subtyping
We investigate a technique from the literature, called the phantom-types technique, that uses parametric polymorphism, type constraints, and unification of polymorphic types to model a subtyping hierarchy. Hindley-Milner type systems, such as the one found in Standard ML, can be used to enforce the subtyping relation, at least for first-order values. We show that this technique can be used to e...
متن کاملOptimal Representations of Polymorphic Types with Subtyping
Many type inference and program analysis systems include notions of subtyping and parametric polymorphism. When used together, these two features induce equivalences that allow types to be simpli ed by eliminating quanti ed variables. Eliminating variables both improves the readability of types and the performance of algorithms whose complexity depends on the number of type variables. We presen...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006